home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / Appearance SDK 1.0.4 / Appearance Sample Code / Source / ColorPenState.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-07-16  |  1.2 KB  |  70 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        ColorPenState.h
  3.  
  4.     Contains:    Utility routines to save and restore the graphics state of a grafport.
  5.  
  6.     Version:    Appearance 1.0 SDK
  7.  
  8.     Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                Edward Voas
  13.  
  14.         Other Contact:        7 of 9, Borg Collective
  15.  
  16.         Technology:            OS Technologies Group
  17.  
  18.     Writers:
  19.  
  20.         (edv)    Ed Voas
  21.  
  22.     Change History (most recent first):
  23.  
  24.          <1>     9/11/97    edv        First checked in.
  25. */
  26.  
  27. #ifndef __COLORPENSTATE__
  28. #define __COLORPENSTATE__
  29.  
  30. #include <Quickdraw.h>
  31.  
  32. #if PRAGMA_ALIGN_SUPPORTED
  33. #pragma options align=mac68k
  34. #endif
  35.  
  36. struct ColorPenState
  37. {
  38.     Boolean            colorPort;
  39.     RGBColor        foreColor;
  40.     RGBColor        backColor;
  41.     PenState        pen;
  42.     SInt16            textMode;
  43.     PixPatHandle    pnPixPat;
  44.     PixPatHandle    bkPixPat;
  45.     Pattern            bkPat;
  46.     UInt32            fgColor;
  47.     UInt32            bkColor;
  48. };
  49. typedef struct ColorPenState ColorPenState;
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55. //    NOTE: The hasColor parameter is going away! Be warned...
  56.  
  57. extern void        GetColorAndPenState( ColorPenState* state );
  58. extern void        SetColorAndPenState( ColorPenState* state );
  59. extern void        NormalizeColorAndPen();
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65. #if PRAGMA_ALIGN_SUPPORTED
  66. #pragma options align=reset
  67. #endif
  68.  
  69. #endif // __COLORPENSTATE__
  70.